package com.blockmeta.bbs.immodule.widget.chatboard;

import androidx.fragment.app.Fragment;

import com.blockmeta.bbs.immodule.fragment.EmojiFragment;
import com.blockmeta.bbs.immodule.fragment.MediaFragment;
import com.blockmeta.bbs.immodule.fragment.SendF10Fragment;
import com.blockmeta.bbs.immodule.fragment.SendMarketFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * @author AirThor
 * @date 2019/2/22.
 */
public class ChatBoardFactory implements IChatBoardFactory{
    private static ChatBoardFactory instance;
    private ChatBoardFactory(){}

    public static ChatBoardFactory getInstance() {
        if (instance==null){
            synchronized (ChatBoardFactory.class){
                if (instance == null) {
                    instance = new ChatBoardFactory();
                }
            }
        }
        return instance;
    }
    @Override
    public List<Fragment> getFragments(){
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(new EmojiFragment());
        fragments.add(new SendMarketFragment());
        fragments.add(new SendF10Fragment());
        fragments.add(new MediaFragment());
        return fragments;
    }
}
